import 'package:shudu/utils/global.dart';

class HistoryModel {
  String? id;
  String? level;
  List<int>? puzzle;
  int? time;
  int? duration;

  HistoryModel({this.id, this.level, this.puzzle, this.time, this.duration});

  HistoryModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    level = json['level'];
    puzzle = json['puzzle'].cast<int>();
    time = json['time'];
    duration = json['duration'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data['id'] = id;
    data['level'] = level;
    data['puzzle'] = puzzle;
    data['time'] = time;
    data['duration'] = duration;
    return data;
  }
}
